<template>
	<!-- #ifdef WEB -->
	<button>为了更好的体验，建议下载 app，点击下载</button>
	<!-- #endif -->

	<!-- #ifdef MP -->
	<video
		src="https://upos-sz-mirrorali.bilivideo.com/upgcxcode/23/11/156381123/156381123-1-16.mp4?e=ig8euxZM2rNcNbRVhwdVhwdlhWdVhwdVhoNvNC8BqJIzNbfq9rVEuxTEnE8L5F6VnEsSTx0vkX8fqJeYTj_lta53NCM=&uipk=5&nbs=1&deadline=1730451071&gen=playurlv2&os=alibv&oi=1948154174&trid=7f7c93d91168402bafc05261d49b837bh&mid=17440817&platform=html5&og=08&upsig=1cc5a69b9903570e708eb8f9dba0c996&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform,og&bvc=vod&nettype=0&f=h_0_0&bw=57596&logo=80000000"
	></video>
	<!-- #endif -->

	<view>
		<uni-badge text="1">
			<button>按钮</button>
		</uni-badge>
		<uni-badge text="2" type="success" @click="bindClick"></uni-badge>
		<uni-badge text="3" type="primary" :inverted="true"></uni-badge>
	</view>
	<uni-calendar
		:insert="true"
		:lunar="true"
		:start-date="'2019-3-2'"
		:end-date="'2024-12-31'"
		@change="change"
	/>
	<!-- 一般用法 -->
	<uni-countdown :day="1" :hour="1" :minute="12" :second="40"></uni-countdown>
	<uni-countdown :second="40"></uni-countdown>
	<uni-rate allowHalf v-model="value" @change="onChange" />
	<button @tap="show">弹框</button>
	<button @tap="getJokes">发请求</button>
	<view>{{ joke }}</view>
</template>

<script setup>
	import { ref } from 'vue'
	const change = (e) => {
		console.log('123', e)
	}
	const show = () => {
		uni.showToast({
			title: '么么哒',
			icon: 'success',
		})
	}

	const joke = ref('笑话')
	const getJokes = async () => {
		const res = await uni.request({
			url: 'https://api-vue-base.itheima.net/api/joke',
		})
		console.log(res)
		joke.value = res.data
	}
</script>

<style></style>
